// 全局apiurl
var urlpath = location.href.indexOf("?") + 1;
urlpath = location.href.substring(urlpath);
var arrapi = urlpath.split("&");
uesrMessage = {}
arrapi.forEach(
    function (item) {
        var brrapi = [];
        brrapi = item.split("=");
        uesrMessage[brrapi[0]] = brrapi[1];
    }
)
userId = uesrMessage.userId;
bzId = uesrMessage.bzId;
num = uesrMessage.number;
regDeptId = uesrMessage.regDeptId;
// var userId = '46a6af5e-65cb-40f9-b551-f9e7ff8bb fb5';
// var bzId = '11579c4e-cb76-4fe1-8894-c104288041c9';
var baseUrl = "http://172.168.1.188/bzapp/"; //开发
// baseUrl = "http://172.168.1.67/bzapp/"
// var baseUrl = "http://192.168.1.134/bzapp/"   //生产

// var baseUrl1 = "http://172.168.1.166/kfdcapp/"  //生产
var baseUrl1 = "http://172.168.1.188:8080/kfdcapp/" //开发


$(function () {
    FastClick.attach(document.body);
});
// alert(bzId);
// num =1;
// var baseUrl = "http://10.36.1.77/bzapp/"
// var userId = ;   
// var bzId = '11579c4e-cb76-4fe1-8894-c104288041c9';

// 班组账号相关id
// userId=46a6af5e-65cb-40f9-b551-f9e7ff8bbfb5&bzId=11579c4e-cb76-4fe1-8894-c104288041c9&regDeptId=d8e2579b-5986-480f-adf8-0d634c139b2f

// 部门账号相关账号
// userId=b070e77e-2289-4b58-979b-2db72d42f9a4&bzId=feae4a0f-5cac-4f03-9bca-bcfa099b54f8

// const u = navigator.userAgent;
// const isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
// const nav = document.querySelector(".nav")
// if(isAndroid) {
//     const clientHeight = document.documentElement.clientHeight || document.body.clientHeight
//     const clientWidth = document.documentElement.clientWidth || document.body.clientWidth
//     window.onresize = function () {
//         const nowClientHeight = document.documentElement.clientHeight || document.body.clientHeight;
//         if (document.activeElement.tagName == 'INPUT' || document.activeElement.tagName == 'TEXTAREA') {
//             if (clientHeight > nowClientHeight) {
//                 //键盘弹出的事件处理
//                 nav.style.bottom = '-100vw'
//             }else {
//                 nav.style.bottom = '0'

//             }
//         }
//     }
// }
if (/Android/gi.test(navigator.userAgent)) {
    window.addEventListener('resize', function () {
        if (document.activeElement.tagName == 'INPUT' || document.activeElement.tagName == 'TEXTAREA') {
            window.setTimeout(function () {
                document.activeElement.scrollIntoViewIfNeeded();
            }, 0);
        }
    })
}
// window.onload = function(){
//     $("input").on("click", function() {
//         var target = this;
//         setTimeout(function() {
//         target.scrollIntoView(true);
//         }, 100);
//     });

// }